﻿using Authority.DataTransferObject.ActionAuthority;
using Authority.DataTransferObject.Role;
using Authority.DataTransferObject.User;
using Authority.Doamin;
using Authority.Doamin.View;
using Authority.IServices.Model.Action;

namespace Authority.ServiceImpls.Profile
{
    public class RoleAuthorityProfile : AutoMapper.Profile
    {
        public RoleAuthorityProfile()
        {
            CreateMap<RoleAuthority, RoleAuthorityListDTO>();
            CreateMap<RoleAuthority, RoleAuthorityNextLevelListDTO>()
                .ForMember(m=>m.ChildrenCount,n=>n.Ignore());
            CreateMap<RoleView, RoleAuthorityDTO>();
        }
    }
}
